import requests

url = "https://cn-gdgz4-cmcc-v-02.acgvideo.com/upgcxcode/44/58/37815844/37815844-1-15.flv?expires=1544676300&platform=pc&ssig=smRpKy3q4OxbV1QfGP1cEQ&oi=3085523422&nfa=7VMUDqBQpI8VGBbhQ1faUQ==&dynamic=1&hfa=2116208201&hfb=Yjk5ZmZjM2M1YzY4ZjAwYTMzMTIzYmIyNWY4ODJkNWI=&trid=735d1374d0ab44a1a46ac93541896c66&nfb=/xc1/CDqdC7gqrb1njxaCA==&nfc=1"

headers = {
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
    # "referer": "https://www.bilibili.com/video/av22774520?from=search&seid=2880100342981751369"
}

print('发送请求<{}>'.format(url))
response = requests.get(url=url, headers=headers)


# print(response.content)

if response.status_code == 200:
    print("正在下载...")
    with open("aa2222.mp4", "wb") as f:
        f.write(response.content)
else:
    print("下载失败")
